package com.shop.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.shop.mapper.AuctionuserMapper;
import com.shop.pojo.Auctionuser;
import com.shop.pojo.AuctionuserExample;
import com.shop.pojo.AuctionuserExample.Criteria;
import com.shop.service.UserService;

@Service
public class UserServiceImpl implements UserService {
	@Autowired
	private AuctionuserMapper userMapper;

	@Override
	public List<Auctionuser> selectByExample(String username,String password) {
		AuctionuserExample example = new AuctionuserExample();
		Criteria criteria = example.createCriteria();
		criteria.andUsernameEqualTo(username);
		criteria.andUserpasswordEqualTo(password);
		List<Auctionuser> list = userMapper.selectByExample(example);
		return list;
	}

	@Override
	public int register(Auctionuser user) {
		return userMapper.insert(user);
	}
	
	
}
